package com.orchid.community.common.exceptions;

import com.orchid.community.common.utils.CodeEnum;

public class CustomException extends RuntimeException{
    private  int code;
    private String message;

    public CustomException(int code, String message) {
        super(message);
        this.code = code;
    }
    public CustomException(CodeEnum codeEnum) {
        super(codeEnum.getMessage());
        this.code = codeEnum.getCode();
    }


    public int getCode() {
        return code;
    }
}
